#pragma once

#include "types.h"
#include "subset.h"

class Grid
{
private:
    States_Subset rows_, columns_;
public:
    inline size_t size() { return rows_.size()*columns_.size(); }

    inline States_Subset const& get_Rows() const { return rows_; }
    inline States_Subset const& get_Columns() const { return columns_; }

    inline void init(States_Subset const& r, States_Subset const& c) { rows_ = r; columns_ = c; }
    inline void set_Rows(States_Subset const& r) { rows_ = r; }
    inline void set_Columns(States_Subset const& c) { columns_= c; }

    inline std::string to_String() const { return rows_.to_String() + "x" + columns_.to_String(); }

    friend bool operator <=(Grid const& l, Grid const& r) { return (l.get_Rows() <= r.get_Rows()) && (l.get_Columns() <= r.get_Columns()); }
};
